<!DOCTYPE html>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
<title><s:property value="getText('app.title')" /></title>
<meta charset="UTF-8" />
<script type="text/javascript" src="${pageContext.request.contextPath}/script/jquery.js"></script>
<link href='${pageContext.request.contextPath}/css/login.css' rel="stylesheet" type="text/css" />
<s:head />
<style type="text/css">
.mytable {
	border-style: none;
	padding: 0;
	border-spacing: 0px;
	border-collapse: collapse;
}

.error {
	color: red;
}
</style>
<script type="text/javascript">
  $(function() {
    $('table td').addClass('login');
    $('table td > input').addClass('login');
    $('#reset').click(function() {
      $('#username').focus();
    });
    $('#submit')
        .click(
            function() {
              var usernameEl = $('#username');
              var passwordEl = $('#password');
              var username = usernameEl.val();
              var password = passwordEl.val();
              if ($.trim(username) == '') {
                var msg = "<s:property value='%{getText(\"error.required\", {getText(\"login.username\")})}'/>";
                alert(msg);
                usernameEl.focus();
                return false;
              } else if ($.trim(password) == '') {
                var msg = "<s:property value='%{getText(\"error.required\", {getText(\"login.password\")})}'/>";
                alert(msg);
                passwordEl.focus();
                return false;
              }
              return true;
            });
  });
</script>
</head>
<body>
  <s:form focusElement="username" action="/j_spring_security_check">
    <table style="width: 100%" class="mytable">
      <tr>
        <td>
          <table style="width: 100%" class="mytable">
            <tr>
              <td width="25%" align="center">&nbsp;</td>
              <td>&nbsp;</td>
              <td width="25%" colspan="2" align="center">&nbsp;</td>
            </tr>
            <tr>
              <td align="center">&nbsp;</td>
              <td>&nbsp;</td>
              <td width="50">&nbsp;</td>
              <td align="center">
                <%-- <img border="0" src="image/login/logo.gif" width="98"
                height="76">--%> &nbsp;
              </td>
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td align="center" class="td-padd">
          <table class="mytable" style="width: 400px; text-align: center;">
            <tbody>
              <tr>
                <td>
                  <table style="width: 100%" class="mytable">
                    <tbody>
                      <tr>
                        <td>
                          <table style="width: 100%" class="mytable">
                            <tr>
                              <td><img
                                src="${pageContext.request.contextPath }/image/login/accel_logo.gif"
                                width="400" height="77"></td>
                            </tr>
                          </table>
                        </td>
                      </tr>
                      <tr>
                        <td colspan="2">
                          <table style="width: 100%" class="mytable">
                            <tbody>
                              <tr>
                                <td>
                                  <table style="width: 100%" class="mytable">
                                    <tbody>
                                      <tr>
                                        <td>
                                          <table
                                            style="width: 100%; padding: 3px; border-style: none; border-collapse: collapse;"
                                            class="tdbox">
                                            <tbody>
                                              <tr>
                                                <td colspan="3" align="right">
                                                  <table
                                                    style="width: 100%; padding: 0px; border-spacing: 20px; border-collapse: collapse; border-color: #666666;">
                                                    <tbody>
                                                      <tr>
                                                        <td class="tdbackgroundfield" align="center">L
                                                          O G I N</td>
                                                      </tr>
                                                    </tbody>
                                                  </table>
                                                </td>
                                              </tr>
                                              <tr>
                                                <td colspan="100%">&nbsp;</td>
                                              </tr>
                                              <tr>
                                                <td align="right" width="38%"><s:property
                                                    value="getText('login.username')" /></td>
                                                <td align="center" width="1%">:</td>
                                                <td width="59%"><input type="text"
                                                  name="j_username" autocomplete="off"
                                                  maxlength="30" id="username" style="width: 200px;" /></td>
                                              </tr>
                                              <tr>
                                                <td align="right"><s:property
                                                    value="getText('login.password')" /></td>
                                                <td align="center">:</td>
                                                <td><input type="password"
                                                  style="width: 200px;" name="j_password"
                                                  id="password" /></td>
                                              </tr>
                                              <tr>
                                                <td colspan="3" align="center">&nbsp;</td>
                                              </tr>
                                              <tr>
                                                <td colspan="3" align="center"><input
                                                  name="Submit"
                                                  value="<s:property value='getText(\"button.login\")'/>"
                                                  type="submit" class="button" id="submit">
                                                  &nbsp; <input name="Reset"
                                                  value="<s:property value='getText(\"button.reset\")'/>"
                                                  type="reset" class="button" id="reset"></td>
                                              </tr>
                                              <tr>
                                                <td colspan="100%" align="center">&nbsp;</td>
                                              </tr>
                                              <tr>
                                                <td colspan="3" align="center" class="error"><s:if
                                                    test="%{#session.SPRING_SECURITY_LAST_EXCEPTION != null}">
                                                    ${sessionScope.SPRING_SECURITY_LAST_EXCEPTION.message}
                                                  </s:if> <s:else>
                                                 &nbsp;
                                                 </s:else></td>
                                              </tr>
                                            </tbody>
                                          </table>
                                        </td>
                                      </tr>
                                    </tbody>
                                  </table>
                                </td>
                              </tr>
                            </tbody>
                          </table>
                        </td>
                      </tr>
                    </tbody>
                  </table>
                </td>
              </tr>
            </tbody>
          </table>
        </td>
      </tr>
      <tr>
        <td>
          <table style="border-style: none; width: 100%; padding: 2px; border-spacing: 0px;">
            <tr>
              <td align="center" class="tdLicense">This software licensed to PT ABC</td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
  </s:form>
</body>
</html>